package cn.fengzhilun.javase.day09.secend;

import java.util.Timer;
import java.util.TimerTask;

import org.junit.Test;

public class TestAbstract {
	//Demo1 demo =new Demo1();
	@Test
	public void test1() throws Exception {
		Timer time=new Timer();
		
		time.schedule(new task(), 2000);
		Thread.sleep(3000);
	}
}
class task extends TimerTask{

	@Override
	public void run() {
		System.out.println("计时开始");
	}
	
	
	
}